<?php /* Smarty version 2.6.19, created on 2012-10-03 12:49:35
         compiled from D:/xampp/htdocs/nghiepquang/templates/IntroBanner/IntroBanner.tpl */ ?>



<?php if ($this->_tpl_vars['baners']): ?>
    <div id="tcs-banner-slide"><a href="http://www.macromedia.com/go/getflashplayer">Tải Flash Player cho trình duyệt của bạn.</a></div>

    <script type="text/javascript">
        var s1 = new SWFObject("<?php echo $this->_tpl_vars['jw_swf_file']; ?>
","ngannv","100%","300","7");
        s1.addParam("allowfullscreen","false");
        s1.addVariable("overstretch","fit");//ảnh hiện full khung hình flash
        s1.addVariable("file","<?php echo $this->_tpl_vars['jw_xml_file']; ?>
?autostart=true&transition=random");

        s1.write("tcs-banner-slide");
    </script>
    <?php endif; ?>

<div style="padding:0" align="left">
<?php if ($this->_tpl_vars['is_admin']): ?>
    <?php echo $this->_tpl_vars['begin_form']; ?>

    <div style="cursor:pointer;margin:10px 0" onclick="jQuery('#admin_home_banner').toggle();"><strong>Quản lý banner</strong></div>
    <div style="margin:10px 0" id="admin_home_banner" class="hide">
        <?php echo $this->_tpl_vars['msg']; ?>
<br/>

        <strong>Up Banner: </strong>
        <input type="file" name="banner"/> <select name="hb_update"><?php echo $this->_tpl_vars['hb_option']; ?>
</select>
        <br/>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>Ảnh</strong> 790x250...( .gif , .jpg ); <b>Flash</b> 790x250... ( .swf )
        <br/><br/>
        <b>Url:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="url" value=""/> <br/>
        <b>Thời gian:</b>&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="sec" value="15"/> <input type="submit" value="Cập nhật"/>


        <table cellpadding="5" cellspacing="1" width="100%" bgcolor="#cccccc">
            <tr bgcolor="#FFFFFF">
                <th colspan="6" align="left" style="padding:3px">
                    Danh sách các Banner
                </th>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td><strong>STT</strong></td>
                <td><strong>Vị trí</strong></td>
                <td><strong>Kiểu</strong></td>
                <td width="51%"><strong>Url</strong></td>
                <td><strong>Thời gian</strong></td>
                <td align="center"><strong>Thao tác</strong></td>
            </tr>
            <?php $_from = $this->_tpl_vars['baners']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['baner']):
?>
                <tr bgcolor="#FFFFFF">
                    <td width="7%"><?php echo $this->_tpl_vars['baner']['stt']; ?>
</td>
                    <td width="8%"><?php echo $this->_tpl_vars['baner']['name']; ?>
</td>
                    <td width="8%"><?php if ($this->_tpl_vars['baner']['type'] == 1): ?>Flash<?php else: ?>Ảnh<?php endif; ?></td>
                    <td><?php echo $this->_tpl_vars['baner']['url']; ?>
</td>
                    <td width="9%"><?php echo $this->_tpl_vars['baner']['time']; ?>
 s</td>
                    <td width="7%" align="center"><a href="<?php echo $this->_tpl_vars['baner']['del']; ?>
" onclick="return confirm('Bạn có chắc chắn muốn xóa không?');">Xóa</a></td>
                </tr>
            <?php endforeach; endif; unset($_from); ?>
        </table>
    </div>
    <?php echo $this->_tpl_vars['end_form']; ?>

<?php endif; ?>
</div>